<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>margin</title>
    <style type="text/css">
        div{
            border: 1px solid #000;
            width: 200px;
            height: 51px;
            outline: solid red 5px;
        }
        div.margin{
            margin: 20px 40px 30px 40px;
        }
    </style>
</head>
<body>
<div>这个块没有指定外边距</div>
<div class="margin">这个块带有指定的外边距</div>
<div>这个块没有指定外边距</div>
</body>
</html>